<?php
namespace config;

Class Config{
    static public function config($type){

        $config_arr = array(
            "redis" => array(   //可读可写redis (master)
                "host" => C('redis_host'),
                "port" => C('redis_port'),
                "auth" => C('redis_auth'),
                "db" => C("redis_db"),
            ),
            "mysql" => array(
                'host' => C('db_host'),
                'port' => C('db_port'),
                'username' => C('db_user'),
                'pwd' => C('db_pwd'),
                "db_name" => C("db_name"),
            ),
            "kafka" => array(
                'host' => C("kafka_host_list"),
                'timeout' => C("kafka_timeout"),
            ),
        );
        return $config_arr[$type];
    }
}
